Generation of images corresponding to a graphics display in a computing system is often accomplished using graphics primitives. Such primitives are known to include triangle primitives, line primitives, and point primitives. In some instances, a graphics primitive is generated that has spatial coordinates that indicate that the primitive is outside of the display area associated with the display frame. As is known, the display area is typically defined using a number of Frustum planes that correspond to minimum and maximum values for the X, Y, and Z coordinate axes. Any portion of a primitive that lies outside of the display space defined by these planes does not contribute to the image drawn to the screen.
FIG. 1 illustrates a graphical representation of a display space that includes a display area and a number of primitives that may lie in various orientations with respect to the display area. The triangle primitive is shown to lie partially within the display area and partially outside of the display area. In some prior art graphics processing systems, a clipping operation that generates a clipped primitive based on the portion of the triangle primitive which is included within the display area is generated. The clipped primitive is then processed to generate pixel data that may be included in the image displayed. Such clipping operations are complex and require a great deal of processing resources.
In order to alleviate some of the processing requirements for clipping operations, some prior art graphics processing systems include a trivial accept guard band such as that illustrated in FIG. 1. Primitives that must be at least partially drawn, or processed, that lie completely within the trivial accept guard band are simply processed without any clipping operations performed. This can be accomplished due to the construction of rasterization circuits that are capable of rasterizing primitives for display windows that are larger than the actual display area of the display. Such trivial accept operations reduce the number of primitives that are clipped, thus reducing the clip processing requirements for a system while slightly increasing the demands on the rasterization circuit. The rasterization block can typically process pixels outside the actual display area at an accelerated rate, which can make this tradeoff an overall performance enhancement.
Further simplification of the processing operations can be accomplished by including a trivial discard option when a graphics primitive is presented for processing. In prior art systems, the coordinates of the vertices of each primitive are compared with the minimum and maximum coordinates of the display area, and if all of the vertices lie external to a particular Frustum plane corresponding to one of the coordinate axis, the primitive is discarded without further processing. Unfortunately, some primitives may appear to lie outside of the display area based on the coordinates of their vertices, while in actuality such primitives include portions that would contribute some pixel information to the actual displayed image if they were processed rather than discarded. Two examples of such primitives are illustrated in FIG. 1.
The line primitive of FIG. 1 is defined by two line vertices that lie outside of the display area. As such, a prior art trivial discard comparison determines that the line vertices both lie outside of the Frustum plane corresponding to the maximum X coordinate value. As a result of such a determination, the line primitive is discarded and not processed. However, primitives such as lines and points, which are understood to have no actual area in a pure mathematical sense, do have a “rasterization area”. Line and point primitives do produce pixel information corresponding to pixels within a rasterization area. For example, a line primitive may result in pixel data covering a rasterization area that is 12 pixels wide and 20 pixels long. As display resolutions increase, the number of pixels that a line or point “covers” may also increase. As such, even though the vertices for the line lie outside of the display area, a portion of the rasterization area corresponding to such primitives may lie within the display area. The dotted box around the line primitive in FIG. 1 corresponds to the rasterization area for the line primitive.
The point primitive of FIG. 1 includes a point vertex that lies outside of the display area while having a rasterization area that lies partially within the display area. By utilizing the coordinates corresponding to the limits of the display area to perform trivial discard operations, primitives that may actually contribute to the displayed image can be discarded. This is undesirable as it can result in aberrations to the displayed image. One example involves a vertical line moving horizontally across the screen, where the line suddenly disappears as its vertices reaches the right-most edge of the display.
Therefore, a need exists for a method and apparatus for processing primitives that ensures that aberrations to the display due to coarse trivial discard determinations are avoided.